//
//  XHRButton.m
//  BuDeJie
//
//  Created by haoran on 16/4/9.
//  Copyright © 2016年 xuhaoran. All rights reserved.
//

#import "XHRTittleButton.h"

@implementation XHRTittleButton

/*
 Designated initializer : 特定构造方法(方法声明后面带有NS_DESIGNATED_INITIALIZER)
 
 Designated initializer missing a 'super' call to a designated initializer of the super class
 
 注意:子类如果重写了父类的特定构造方法, 那么必须使用super调用父类的特定构造方法
 */

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        // 设置字体大小
        self.titleLabel.font = [UIFont systemFontOfSize:16];
        // 设置字体颜色
        [self setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self setTitleColor:[UIColor redColor] forState:UIControlStateSelected];
    }
    return self;
}

/**
 *  不让按钮进入高亮状态
 */
-(void)setHighlighted:(BOOL)highlighted{

}

@end
